# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

# 定义程序核心文件与资源
a = Analysis(
    ['main_ui.py'],
    pathex=[],
    # FFmpeg路径（确保实际文件存在于该路径）
    binaries=[
        ('ffmpeg/bin/ffmpeg.exe', '.'),
        ('ffmpeg/bin/ffprobe.exe', '.')
    ],
    # 关键：添加图标文件到打包资源，确保运行时能找到
    datas=[('0603.ico', '.')],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='Ez MP3转换器',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,  # GUI程序关闭控制台，正确
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon='0603.ico',  # exe文件本身的图标
)